package org.fast.easy.oss.feign.service;

import org.fast.easy.core.domain.messages.MessagePublishDomain;
import org.fast.easy.core.domain.result.R;
import org.fast.easy.oss.domain.vo.OriginalFile;
import org.fast.easy.oss.domain.vo.RemoteFile;
import org.fast.easy.oss.feign.factory.OssFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;


import static org.fast.easy.oss.feign.constant.OssServiceNameConstants.*;

/**
 * 类说明
 *
 * @author YanMing
 * @date 2024/5/15
 */
@FeignClient(contextId = OSS_FEIGN_SERVICE_CONTEXT_ID, value = OSS_FEIGN_SERVICE_NAME, fallbackFactory = OssFeignFallbackFactory.class)
public interface OssFeignService {

    @PostMapping(OSS_SERVICE_MAPPING+"/upload")
    public R<RemoteFile> upload(OriginalFile file);
}
